<{include file="../common/iframe_head.tpl"}>
<table class="gridtable table  table-bordered">
        <tr>
        <th width="15%">操作用户</th>
        <th width="7%">等级/是否还分</th>
        <th width="10%">对标情况</th>
        <th width="35%">申诉意见</th>
        <th width="16%">操作时间</th>
        <th width="6%">附件</th>
        <{if $netquestion.status==1}><th width="6%">操作</th><{/if}>
    </tr>
    <{foreach $list as $key => $val}>
    <tr id="qb_<{$val.qb_id}>" <{if $val.is_self==1}>style="background:#8fbc8f"<{/if}>>
        <td><{$val.network_name}></td>
        <td><{if $networklevel[$val.level]}><{$networklevel[$val.level].desc}><{else}><{/if}></td>
        <{if $val.is_self==1}>
        <td><{if $val.isreturn==1}>申请还分<{elseif $val.isreturn==0}>不申请<{else}>未知<{/if}></td>
        <td style="word-wrap:break-word;word-break:break-all;line-height: 20px" title="<{$val.suggestion}>"><{$val.suggestion}></td>
        <{else}>
            <td colspan="2" style="word-wrap:break-word;word-break:break-all;line-height: 20px" title="<{$val.suggestion}>"><{$val.suggestion}></td>
        <{/if}>
        <td><{$val.create_time}></td>
        <td>
            <{if $val.haveattach}>
            <a href="javascript:;" onclick="attachlist(<{$val.nq_id}>,<{$val.subject_id}>,<{$val.network_id}>)">附件</a>
            <{/if}>
        </td>
        <{if $netquestion.status==1}>
        <td>
            <{if $netquestion.node_id==0||$netquestion.node_id>=$level}>
            <{if $val.network_id==$network_id}>
                <{if $level!=4}>
                <a href="javascript:;" onclick="suggest(<{$val.nq_id}>,<{$val.subject_id}>);">编辑</a> 
                <{else}>
                <a href="javascript:;" onclick="shenqing(<{$val.nq_id}>,<{$val.subject_id}>,<{$val.qb_id}>);">编辑</a> 
                <{/if}>
            <a href="javascript:;" onclick="del(<{$val.qb_id}>)">删除</a>
            <{/if}>
            <{/if}>
        </td>
        <{/if}>
    </tr>
    <{/foreach}>
        <!-- 后台审核列表-->
    <{if $managelist}>
    <{foreach $managelist as $k => $v}>
    <tr style="background: #529EC6;">
        <td><{$v.truename}></td>
        <td>
            <{if $v.isreturn_type=='改'}>是<{/if}>
            <{if $v.isreturn_type=='扣'}>改扣<{/if}>
            <{if $v.isreturn_type=='是'}>是<{/if}>
            <{if $v.isreturn_type=='否'}>否<{/if}>
        </td>
        <td>
            <{if in_array($v.isreturn_type,array('是','否'))}>
                <{if $question.show_score}>
                    <{if $v.isreturn_type=='是'}>
                        还分至<{$v.isreturn}>
                    <{/if}>
                <{else}>
                        还分
                <{/if}>
            <{/if}>

            <{if in_array($v.isreturn_type , array('改','扣'))}>
                <{if $question.show_score}>
                    改扣至<{$v.isreturn}>
                <{else}>
                    改扣
                <{/if}>
            <{/if}>
        </td>
        <td><{$v.suggestion}></td>
        <td colspan="3"><{$v.create_time}></td>
        </tr>
        <{/foreach}>
    <{/if}>
</table>
<script>
 //申请还分附件列表
function attachlist(nq_id,subject_id,network_id){
    $.layer({
        type: 2,
        title: '申请还分附件列表',
        closeBtn: [0, true],
        shade: [0.5, '#000'],
        border:[10, 0.3, '#000'],
        offset: ['10px',''],
        area: ['450px', '350px'],
        iframe: {src: '/benchmark/DuibiaoAttach?nq_id='+nq_id+'&subject_id='+subject_id+'&network_id='+network_id}
    }); 
        
}
//删除
function del(qb_id){
    if (confirm('确定删除？')) {
        $.getJSON('/benchmark/DelAudit',{qb_id:qb_id},function(res){
        if (res.status==1) {
            $('#qb_'+qb_id).remove();
        }
        alert(res.note);
        });
        
    }
}
//还分申请
function shenqing(nq_id,subject_id,qb_id){
    $.layer({
        type: 2,
        title: '对标内容',
        closeBtn: [0, true],
        shade: [0.5, '#000'],
        border:[10, 0.3, '#000'],
        offset: ['10px',''],
        area: ['550px', '450px'],
        iframe: {src: '/benchmark/duibiao?nq_id='+nq_id+'&subject_id='+subject_id+'&iframe=1'}
    });   
}
//上级网点给出意见
function suggest(nq_id,subject_id){
    $.layer({
        type: 2,
        title: '审核意见',
        closeBtn: [0, true],
        shade: [0.5, '#000'],
        border:[10, 0.3, '#000'],
        offset: ['50px',''],
        area: ['500px', '400px'],
        iframe: {src: '/benchmark/suggest?nq_id='+nq_id+'&subject_id='+subject_id+'&iframe=1'}
    });   
}
</script>
<{include file="../common/footer.tpl"}>